<template>
	<div style="display: flex;flex-direction: column;" class="otherPage centreOfExcellence compensationAndBenefits">
		<Header :selected="8"></Header>
		<div class="bannerArea">
			<div class="banner" :style="bgImg? 'background:url('+bgImg+') no-repeat;background-size:cover; ':''"></div>
		</div>
		<Navigation v-loading="loading" :items="breadcrumbItems" :menus="menus" :checked="2" :bgColor="bgColor">
		</Navigation>
		<div class="content" style="min-height: 600px;">
			<div  class="content_bg" style="min-height: 600px;text-align: center;">
				<img :src="data.fileUrl" style="width: 65%; height: auto;" />
			</div>
		</div>
		<Footer></Footer>
	</div>
</template>

<script>
	import Header from '../../components/common/header/Header.vue'
	import Navigation from '../../components/common/navigation/Navigation.vue'
	import Footer from '../../components/common/footer/Footer.vue'
	import {
		centreOfExcellenceMenu
	} from '../../utils/menu.js'
	// 导入您需要的模块
	import Swiper from "swiper";
	export default {
		components: {
			Header,
			Navigation,
			Footer
		},
		data() {
			return {
				loading: true,
				bgImg: '', //头部banner，默认值已绑定，有背景自动切换
				bgColor: "white", //white/red
				menus: centreOfExcellenceMenu,
				breadcrumbItems: [{
						label: this.$t('home'),
						to: '/'
					},
					{
						label: this.$t('centreOfExcellence'),
						to: '/centreOfExcellence'
					},
					{
						label: this.$t('compensationAndBenefits'),
						to: '/compensationAndBenefits'
					}
				],
				hoverIndex: -1,
				data: {
					content: ""
				}

			};
		},
		computed: {},
		created() {},
		mounted() {
			this.bindBg()
			this.bindSalaryBenefitsTopImage().then(i => {
				this.$request.setImageMaxwidth("img");
			});
		},
		methods: {
			/**
			 * 获取薪酬福利内容
			 */
			bindSalaryBenefitsTopImage() {

				return new Promise((resolve, reject) => {
					let params = {};
					let that = this;
					that.$request.getSalaryBenefits(params).then(res => {
						this.data = res.data
						this.loading = false;
						resolve();
					}).catch((error) => {
						console.log(error);
					});
				});
			},
			/**
			 * 获取薪酬福利顶部背景
			 */
			bindBg() {
				let params = {};
				let that = this;
				that.$request.getSalaryBenefitsTopImage(params).then(res => {
					this.bgImg = res.data.fileUrl
				}).catch((error) => {
					console.log(error);
				});

			},

		}
	}
</script>

<style scoped>
	@import url("../../components/common/css/corporateOverview/companyProfile.css");
</style>
